package com.zhida.blogservice.controller;

import com.zhida.blogservice.service.IBlogService;
import com.zhida.common.entity.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ling
 * @since 2024-07-29
 */
@RestController
@RequestMapping("/blog")
public class BlogController {

    @Resource
    IBlogService blogService;

    @RequestMapping("/likeBlog/{blog_id}")
    public Result<?> likeBlog(@PathVariable int blog_id){
        return blogService.likeBlog(blog_id);
    }
}
